<?php

/**
 * SupportRequest form base class.
 *
 * @package    wifilez
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseSupportRequestForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'support_request_id' => new sfWidgetFormInputHidden(),
      'publisher_id'       => new sfWidgetFormInput(),
      'account_id'         => new sfWidgetFormPropelChoice(array('model' => 'Account', 'add_empty' => true)),
      'product_id'         => new sfWidgetFormPropelChoice(array('model' => 'Product', 'add_empty' => true)),
      'customer_name'      => new sfWidgetFormInput(),
      'email'              => new sfWidgetFormInput(),
      'subject'            => new sfWidgetFormInput(),
      'created'            => new sfWidgetFormDateTime(),
      'modified'           => new sfWidgetFormDateTime(),
      'status'             => new sfWidgetFormInput(),
      'comment'            => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'support_request_id' => new sfValidatorPropelChoice(array('model' => 'SupportRequest', 'column' => 'support_request_id', 'required' => false)),
      'publisher_id'       => new sfValidatorInteger(),
      'account_id'         => new sfValidatorPropelChoice(array('model' => 'Account', 'column' => 'account_id', 'required' => false)),
      'product_id'         => new sfValidatorPropelChoice(array('model' => 'Product', 'column' => 'product_id', 'required' => false)),
      'customer_name'      => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'email'              => new sfValidatorString(array('max_length' => 128, 'required' => false)),
      'subject'            => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'created'            => new sfValidatorDateTime(array('required' => false)),
      'modified'           => new sfValidatorDateTime(array('required' => false)),
      'status'             => new sfValidatorInteger(array('required' => false)),
      'comment'            => new sfValidatorString(array('max_length' => 255, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('support_request[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'SupportRequest';
  }


}
